﻿<%@ Page Title="" Language="C#" MasterPageFile="~/source/masterpage/Base.Master" AutoEventWireup="true" CodeBehind="ProductsDetails.aspx.cs" Inherits="QLK.Web.ProductsDetails" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <title></title>
    
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div></div>
<div></div>
    <div>
        <table class="style1">
            <tr>
                <td style="text-align: center">
                    <b>PRODUCTS&#39; DETAILS</b></td>
            </tr>
            <tr>
                <td style="text-align: center">
                    <br />
                    <asp:LinkButton ID="btnAdd" runat="server" ForeColor="Lime" 
                        onclick="btnAdd_Click">Add more products</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnDelete" runat="server" ForeColor="Lime" 
                        onclick="btnDelete_Click">Delete checked</asp:LinkButton>
                    <br />
                </td>
            </tr>
            <tr>
                <td style="text-align: center">
                    <asp:Label ID="lblWarning" runat="server" ForeColor="#FF3300"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align: center">
                <center>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:GridView ID="grvProducts" runat="server" 
    AutoGenerateColumns="False" AllowPaging="True" onpageindexchanging="grvProducts_PageIndexChanging">
                                <Columns>
                                    <asp:TemplateField HeaderText="Edit">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:ImageButton ID="ImgEdit" runat="server" ImageUrl="~/images/edit_desc.gif" 
                                                onclick="ImgEdit_Click" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Check">
                                        <EditItemTemplate>
                                            <asp:CheckBox ID="CheckBox1" runat="server" />
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="ckDelete" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="ProductID" HeaderText="ProductID" />
                                    <asp:BoundField DataField="UPC" HeaderText="UPC" />
                                    <asp:BoundField DataField="ProductName" HeaderText="ProductName" />
                                    <asp:BoundField DataField="CategoryID" HeaderText="CategoryID" />
                                    <asp:BoundField DataField="Manufacture" HeaderText="Manufacture" />
                                    <asp:TemplateField HeaderText="Images">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval("Image") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Image ID="ImgProduct" runat="server" Height="40px" 
                                                ImageUrl='<%# Eval("Image") %>' Width="40px" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    </center>
                        </td>
            </tr>
            <tr>
                <td style="text-align: center">
                    <asp:LinkButton ID="btnAdd0" runat="server" ForeColor="Lime" 
                        onclick="btnAdd_Click">Add more products</asp:LinkButton>
                        </td>
            </tr>
        </table>
    </div>

</asp:Content>
